import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);
const router = new Router({
  routes: [
    {
      path: "/",
      name: "Home",
      component: () => import("../views/Home.vue"),
    },
  ],
});
router.beforeEach((to, from, next) => {
  next();
  //   let islogin = localStorage.getItem("islogin");
  //   if(to.path == '/login') {
  //     next()
  //   }else{
  //     // requireAuth:可以在路由元信息指定哪些页面需要登录权限
  //     if(to.meta.requireAuth && islogin) {
  //       next()
  //     }
  //   }
});
export default router;
